package com.aep.ProjetoAnalise;

import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;

import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import java.net.URL;
import java.util.List;
import java.util.Vector;

/**
 * Created with IntelliJ IDEA.
 * User: Christian
 * Date: 09/05/13
 * Time: 14:53
 * To change this template use File | Settings | File Templates.
 * Classe RSSFeed representa um arquivo de Feed em XML na forma de um vetor com os itens do Feed
 */
public class RSSFeed {
    private String _title = null;
    private String _pubdate = null;
    private int _itemcount = 0;
    private List<RSSItem> _itemlist;
    private int i = 0;
    RSSFeed(){
        _itemlist = new Vector(0);
    }

    int addItem(RSSItem item){
           _itemlist.add(item);
           _itemcount++;

           return _itemcount;
    }

    RSSItem getItem(int location){
        return _itemlist.get(location);
    }

    List getAllItems(){
        return _itemlist;
    }

    int getItemCount(){
        return _itemcount;
    }

    void setTitle(String title){
        _title = title;
    }

    void setPubDate(String pubdate){
        _pubdate = pubdate;
    }

    String getTitle(){
        return _title;
    }

    String getPubDate(){
        return _pubdate;
    }
}
